package com.yunxin.mybatisplus.bean;

import com.yunxin.mybatisplus.utils.datahandler.DataProcess;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Description: 测试数据处理
 *
 * @Author sbx
 * @Create 2025/9/4 15:38
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
// 类级别：所有 BigDecimal 字段默认保留3位
@DataProcess(3)
public class TestDataProcess {

    // 覆盖：保留1位
    @DataProcess(1)
    private BigDecimal a1;

    private BigDecimal b1;

    // 不受影响
    private Double a2;
    private double a3;
    private Float a4;
    private float a5;
    private Long a6;
    private long a7;
    @DataProcess(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date a8;
    @DataProcess(pattern = "yyyy-MM-dd HH:mm-ss")
    private Date a9;
}
